From: Glenn Morris Date: Thu, 2 Apr 2009 06:33:18 +0000 (+0000) Subject: (diary-cyclic): Check for +ve N. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~996 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=0a1eed00e9e133d43fc43bcf83ce4a444fa3b0fb;p=emacs.git (diary-cyclic): Check for +ve N. --- diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 57f18f69137..0081170d8ac 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1912,6 +1912,8 @@ and %s by the ordinal ending of that number (that is, `st', `nd', An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." + (or (> n 0) + (error "Day count must be positive")) (let* ((diff (- (calendar-absolute-from-gregorian date) (calendar-absolute-from-gregorian (diary-make-date month day year))))